<html lang="zh-CN">
	<head>
		<meta charset="utf-8"/>
		<title></title>
		<link rel="stylesheet" type="text/css" href="css/common.css"/>
		<script src="js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<div class="tingyu">
			<h1>聆雨</h1>
			<p>且听细雨,勿湿衣襟</p>
			<span></span>
			<div class="tingyu-img">
				<img src="img/tingyu-img.png" alt="" />
			</div>
			<div class="tingyu-icon" >
				<img src="img/tingyu-icon.png" alt=""  onclick="startPlay();"/>
			</div>
		</div>
		<script type="text/javascript">
		document.addEventListener( "plusready", onPlusReady, false );
			function onPlusReady() { 
			}
			var p = null; 
			var icon = $(".tingyu-icon img");
			function startPlay() {
				if ( plus.audio == undefined ) {
					alert( "Device not ready!" );
				}
				p = plus.audio.createPlayer( "audio/yusheng.mp3" );
				p.play( function () {
					alert( "Audio play success!" ); 
				}, function ( e ) {
					alert( "Audio play error: " + e.message ); 
				} ); 
				if (icon.attr("onclick")=="startPlay();") {
					icon.attr("onclick","stopPlay();");
				}else{
					icon.attr("onclick","startPlay();");
				}
			}
			function stopPlay() {
				p.stop();
				if (icon.attr("onclick")=="startPlay();") {
					icon.attr("onclick","stopPlay();");
				}else{
					icon.attr("onclick","startPlay();");
				}
			}
		</script>
		<script src="js/common.js" type="text/javascript" charset="utf-8"></script>
	</body>
</html>
